<?php
/**
 * JE Career package
 * @author J-Extension <contact@jextn.com>
 * @link http://www.jextn.com
 * @copyright (C) 2012 - 2013 J-Extension
 * @license GNU/GPL, see LICENSE.php for full license.
**/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

$doc = & JFactory::getDocument();
$cs  = JURI::base().'components/com_hostingrajacareer/assets/css/style.css';
$doc->addStyleSheet($cs);
?>
<div id="je_career_main_outer">
	<div id="c_o_head_div"><b><?php if ( $this->settings->show_title == '1'){ if($this->settings->career_title==null){ echo JText::_( 'JE_HEADING_DEFAULT' ); }else{echo $this->settings->career_title;}} ?></b>
	</div>
	<table border="0" id="products" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td id="top-left"></td>
			<td id="top-center"></td>
			<td id="top-right"></td>
		</tr>
		<tr>
			<td id="middle-left"></td>
			<td>
				<div id="c_o_content_top_div">
					<p>
						<?php echo $this->settings->description_default; ?>
					</p>
				</div>
				<table class="c_o_table_cat" width="100%">
					<thead>
						<tr class="c_o_head_tr">
							<th align="left" width="40%" nowrap="nowrap" >
								<?php echo JText::_( 'JE_CAREER_CATEGORY' ); ?>
							</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="4"  align="center">
								<?php echo $this->pageNav->getListFooter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
			 				if($this->items){
						?>
						<?php
						$k = 0;
						for ($i=0, $n=count( $this->items ); $i < $n; $i++)
						{
							$row 		= &$this->items[$i];
							$checked 	= JHTML::_('grid.id',   $i, $row->id );
							$itmid 		= JRequest::getVar('Itemid');
							$link 		= JRoute::_( 'index.php?option=com_hostingrajacareer&view=career&cid='. $row->id.'&Itemid='. $itmid );
						?>
						<tr class="<?php echo "row$k"; ?>">
							<td align="left">
								<span id="category_cr_heading"><a href="<?php echo $link; ?>"><?php echo ucfirst($row->category); ?></a></span>
								<p><?php echo $row->introtext; ?></p>
							</td>
						</tr>
						<?php
						$k = 1 - $k;
						}
						?>
						<?php }else{ ?>
						<tr>
							<td align="left">
								<?php echo JText::_( 'JE_NO_OPENINGS' ); ?>
							</td>
						</tr>
						<?php } ?>
					</tbody>
				</table>
			</td>
			<td id="middle-right"></td>
		</tr>
		<tr>
			<td id="bottom-left"></td>
			<td id="bottom-center"></td>
			<td id="bottom-right"></td>
		</tr>
	</table>
</div>